package com.czxy.Demo18;

public class Test {
    public static void main(String[] args) {
        Alto alto = new Alto("奥托" , "黑色" , 5.6);
        Audi audi = new Audi("奥迪" , "灰色" , 19.9);

        RentalHouse rentalHouse = new RentalHouse();

        double rent = rentalHouse.rent(alto, 7);
        System.out.println(alto.getBrand() + ":" + rent);

        double rent1 = rentalHouse.rent(audi, 2);
        System.out.println(audi.getBrand() + ":" + rent1);

    }
}
